package com.ctvit.cch.web.controller;

import com.ctvit.cch.core.service.IInspirationRecordService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;

import org.springframework.web.bind.annotation.*;

/**
 * 灵感记录表 控制器
 *
 * @author heyingcheng
 * @date 2025/10/22
 */
@RestController
@RequestMapping("/inspiration/record")
public class InspirationRecordController extends BaseController {

    private IInspirationRecordService inspirationRecordService;

    public InspirationRecordController(IInspirationRecordService inspirationRecordService) {
        this.inspirationRecordService = inspirationRecordService;
    }

    /**
     * 获取灵感记录详情
     *
     * @param creationId 灵感记录ID
     * @return {@link AjaxResult} 灵感记录详情
     */
    @PostMapping("/list/by/creation")
    public AjaxResult listByCreationId(@RequestParam String creationId) {
        return success(inspirationRecordService.listByCreationId(creationId));
    }

}